﻿using System;
using System.Xml.Linq;
using Geometries = GisSharpBlog.NetTopologySuite.Geometries;

namespace AzukiMap.MapSource
{
    public class RasterFileSource : RasterSource
    {
        public RasterFileSource()
            : base("raster file", AzukiMapSettings.DEFAULT_SRID)
        {
            
        }

        public RasterFileSource(string name, MapSourceTypes type, int srid, CoordinationUnits coordUnit)
            : base(name, srid)
        {
        }

        public RasterFileSource(Uri imgUri, Geometries.Polygon imgExtent, double imgOrgWidth, double imgOrgHeight, int dpi, string name, MapSourceTypes type, int srid, CoordinationUnits coordUnit)
        //public RasterFileSource(Uri imgUri, Geometries.Envelope imgExtent, double imgOrgWidth, double imgOrgHeight, int dpi, string name, int srid)
            : base(name, srid)
        {
            _width = imgOrgWidth;
            _height = imgOrgHeight;
            _rasterSourceUri = imgUri;
            MaxExtent = imgExtent;
            _dpi = dpi;
        }

        public override XElement ToXml()
        {
            return ToXml("RasterFileSource");
        }

        public override XElement ToXml(string elementName)
        {
            return base.ToXml(elementName);
        }


    }
}
